import Vue from 'vue'
import ElementUI from 'element-ui'
// import 'element-ui/lib/theme-default/index.css'
import 'element-ui/lib/theme-chalk/index.css'
import Menu from '../components/menu.vue'
import Menu2 from '../components/menu-unlogin.vue'
import Footer from '../components/footer.vue'

import Layout from './home/layout.vue'
import Center from '../center.vue'

Vue.use(ElementUI)
Vue.use(Center)

// 菜单
var menu = new Vue({
  el: '#menu',
  render: h => h('Y' == _Aurora['isLogin']? Menu:Menu2)
})
// 布局
var layout = new Vue({
    el: '#layout',
    render: h => h(Layout)
});

// 页脚
var footer = new Vue({
    el: '#footer',    
    render: h => h(Footer)
});

if('' != _Aurora['user']){
    if('Y' == _Aurora['illuser']){}
    else if('Y' == _Aurora['isLogin']){}
}else{
    menu.$notify({
        title: 'Aurora 提示',
        message: '欢饮访问 Aurora 用户中心，点击跳转到登陆页面',
        type: 'success',
        offset: 200,
        onClick: function(){
            location.href = '/aurora/index/login'
        }
    })
}
